import { EnumAnimate, EnumMultiTabMode } from '@/enum'
import {
  ThemeSettings,
  AnimateTypeInfo,
  AnimateType,
  MultiTabMode,
  MultiTabModeInfo,
} from '@/interface'
import * as appDefault from './app-default'

const animateTypeInfos: AnimateTypeInfo[] = Object.keys(EnumAnimate)
  .map((k) => <AnimateType>k)
  .map((animateType) => ({
    value: animateType,
    label: EnumAnimate[animateType],
  }))
const tabModeList: MultiTabModeInfo[] = Object.keys(EnumMultiTabMode)
  .map((v) => v as MultiTabMode)
  .map((v) => ({ value: v, label: EnumMultiTabMode[v] }))
const themeSettings: ThemeSettings = {
  darkMode: false,
  themeColor: appDefault.primaryColor,
  themeColorList: appDefault.themeColorList,
  otherColor: {
    info: appDefault.infoColor,
    success: appDefault.successColor,
    warning: appDefault.warningColor,
    error: appDefault.errorColor,
  },
  navStyle: {
    mode: 'vertical',
    theme: 'light', // 左侧导航栏/工作区颜色
  },
  headerStyle: {
    height: 48,
    bgColor: '#fff',
    fixed: true,
    showReload: true,
  },
  /** 左侧导航栏配置 */
  menuStyle: {
    width: 200, // 展开时的宽度,单位px
    mixWidth: 80,
    collapsedWidth: 64, // 折叠时的宽度，单位px
    fixed: true,
    splitMenu: false,
  },
  multiTabStyle: {
    height: 44,
    visible: true,
    bgColor: '#fff',
    mode: 'browser',
    modeList: tabModeList,
  },
  crumbsStyle: {
    visible: true,
    showIcon: false,
  },
  pageStyle: {
    animate: true,
    animateType: 'zoom-fade',
    animateTypeInfos,
  },
}

export default themeSettings
